package com.project.bean;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author lyl
 * description:主贴所属实体bean
 */
public class MainContentBean {
    /**
     * 主贴id
     */
    private int mainContentId;

    /**
     * 主贴标题
     */
    private String mcTitle;

    /**
     * 主贴内容
     */
    private String mcContent;

    /**
     * 发帖时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime mainDateTime = LocalDateTime.now();

    /**
     * 回帖数量
     */
    private int allSCCount = 0;

    /**
     * 所属用户
     */
    private UserBean userBean;

    /**
     * 所属主题板块
     */
    private ThemeBean themeBean;

    /**
     * 所包含的跟帖list
     */
    private List<SubContentBean> subContentBeanList;

    public MainContentBean() {
    }

    public MainContentBean(String mcTitle, String mcContent) {
        this.mcTitle = mcTitle;
        this.mcContent = mcContent;
    }

    public int getMainContentId() {
        return mainContentId;
    }

    public void setMainContentId(int mainContentId) {
        this.mainContentId = mainContentId;
    }

    public String getMcTitle() {
        return mcTitle;
    }

    public void setMcTitle(String mcTitle) {
        this.mcTitle = mcTitle;
    }

    public String getMcContent() {
        return mcContent;
    }

    public void setMcContent(String mcContent) {
        this.mcContent = mcContent;
    }

    public LocalDateTime getMainDateTime() {
        return mainDateTime;
    }

    public void setMainDateTime(LocalDateTime mainDateTime) {
        this.mainDateTime = mainDateTime;
    }

    public UserBean getUserBean() {
        return userBean;
    }

    public void setUserBean(UserBean userBean) {
        this.userBean = userBean;
    }

    public ThemeBean getThemeBean() {
        return themeBean;
    }

    public void setThemeBean(ThemeBean themeBean) {
        this.themeBean = themeBean;
    }

    public int getAllSCCount() {
        return allSCCount;
    }

    public void setAllSCCount(int allSCCount) {
        this.allSCCount = allSCCount;
    }

    public List<SubContentBean> getSubContentBeanList() {
        return subContentBeanList;
    }

    public void setSubContentBeanList(List<SubContentBean> subContentBeanList) {
        this.subContentBeanList = subContentBeanList;
    }

    @Override
    public String toString() {
        return "MainContentBean{" +
                "mainContentId=" + mainContentId +
                ", mcTitle='" + mcTitle + '\'' +
                ", mcContent='" + mcContent + '\'' +
                ", mainDateTime=" + mainDateTime +
                ", allSCCount=" + allSCCount +
                ", userBean=" + userBean +
                ", themeBean=" + themeBean +
                ", subContentBeanList=" + subContentBeanList +
                '}' + "\n";
    }
}
